import request from '@/utils/request'


// 获取列表
export function attachmentGetList(pd) {
  return request({
    url: '/sys/attachment/getList',
    method: 'get',
    params: pd
  })
}

// 获取列表
export function attachmentGetInfo(pd) {
  return request({
    url: '/sys/attachment/getInfo',
    method: 'get',
    params: pd
  })
}

// 新增
export function attachmentAdd(data) {
  return request({
    url: '/sys/attachment',
    method: 'post',
    data: data
  })
}

// 修改
export function attachmentEdit(pd) {
  return request({
    url: '/sys/attachment',
    method: 'put',
    data: pd
  })
}

// 删除参数配置
export function attachmentDel(id) {
  return request({
    url: '/sys/attachment/' + id,
    method: 'delete'
  })
}

// 路径删除附件
export function attachmentDelUrl(fileUrl) {
  return request({
    url: '/sys/attachment/delUrl',
    method: 'delete',
    params: {
      fileUrl
    }
  })
}

// 多个新增附件
export function attachmentAddMore(data) {
  return request({
    url: '/sys/attachment/moreAdd',
    method: 'post',
    data: data
  })
}

// 用户文件上传
export function attachmentUploadPicture(data) {
  return request({
    url: "/sys/attachment/uploadPicture",
    method: 'post',
    data: data
  })
}
// 路径删除文件
export function attachmentDelFileUrl(fileUrl) {
  return request({
    url: '/sys/attachment/delFile',
    method: 'delete',
    params: {
      fileUrl
    }
  })
}

